<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>选择器权重案例</title>
    <style>
        .test1{color:red;}
        .test1{color:blue;}
        
        .test2{color:red!important;}
        .test2{color:blue;}
        
        #test3{color:red;}
    </style>
</head>
<body>
    <div class="test1">test1</div>
    <div class="test2">test2</div>
    <div id="test3" style="color:blue">
        test3
    </div>
</body>
</html>